package com.thug.engine;

import java.util.Date;

public class Clock {

	private final static Clock mClock = new Clock();
	Date mDate;
	long mStartTime;
	
	private Clock() {
		mDate = new Date();
		mStartTime = mDate.getTime();
	}
	
	/**
	 * get Singleton instance
	 * @return
	 */
	public final static Clock getInstance() {
		return mClock;
	}
	
	/**
	 * @return the milliseconds elapsed from the starting of the application
	 */
	public final float getPassedTime() {
		return (mDate.getTime() - mStartTime);
	}
}
